package com.example.homework.homework05;

public class Test {
    public static void main(String[] args) {
        // 1.创建两个线程任务对象
        PrinterNumTask printerNumTask = new PrinterNumTask(1);
        PrinterCharTask printerCharTask = new PrinterCharTask('A');

        // 2.创建四个线程对象
        Thread t1 = new Thread(printerNumTask);
        Thread t2 = new Thread(printerNumTask);
        Thread t3 = new Thread(printerCharTask);
        Thread t4 = new Thread(printerCharTask);

        // 3.启动四个线程
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
